<html>
<body>
<pre>
<?php

require_once("Bootstrap.php");

$gd = new raster();
$gd->createResource(500,500);
$black = $gd->createColour(0,0,0);
$red = $gd->createColour(255,0,0);
$blue = $gd->createColour(0,0,255);
$gd->drawTri(new cPoint3(250,100,0),new cPoint3(400,250,0),new cPoint3(250,400,0),$black);
$gd->drawTri(new cPoint3(250,100,0),new cPoint3(100,250,0),new cPoint3(250,400,0),$black);

$gd->drawLine(new cPoint3(0,0,10),new cPoint3(499,499,10),$red);
$gd->drawLine(new cPoint3(499,0,-50),new cPoint3(0,499,-50),$blue);

$greenAlpha = $gd->createColour(0,255,0,0.8);
$gd->drawTri(new cPoint3(0,0,-50),new cPoint3(50,0,-50),new cPoint3(0,50,-50),$greenAlpha);

$pinkAlpha = $gd->createColour(255,0,255,0.5);
$gd->drawQuad(new cPoint3(200,50,-20),new cPoint3(300,50,-20),new cPoint3(300,150,-20),new cPoint3(200,150,-20),$pinkAlpha);
$gd->drawQuad(new cPoint3(200,350,20),new cPoint3(200,450,20),new cPoint3(300,450,20),new cPoint3(300,350,20),$pinkAlpha);

$gd->render('out.png');

?>
</pre>
<br/><br/>
<img src="out.png"/>
</body>
</html>